n =int (input("请输入一位整数："))
sum = 0
for i in range (n+1) :
    sum += i
print ("1~%d的求和结果是%d"%(n,sum))